package com.intcast;

import java.util.Random;
import java.util.Scanner;

/*
要写注释哦!!!
*/
public class Demo07 {
    public static void main(String[] args) {
        int[] arr = {9, 666, 188, 520, 99999};
        Scanner sc = new Scanner(System.in);
        Random r = new Random();
        for (int i = 0; i < arr.length; i++) {
            System.out.println("请输入任意键进行抽奖：");
            sc.nextLine();
            while (true) {
                int index = r.nextInt(arr.length);
                if (arr[index] != 0) {
                    System.out.println("恭喜你抽中了" + arr[index]);
                    arr[index] = 0;
                    break;
                }
            }
        }
    }
}
